const state = {
    loginToken: ''
}

const mutations = {
    getToken(state) {
        state.isCollapse = !state.isCollapse
    },
    setToken(state, payload) {
        if (state.selectMenu.findIndex(item => item.path === payload.path) === -1) {
            state.selectMenu.push(payload)
        }
    },
    clearToken(state, payload) {
        const index = state.selectMenu.findIndex(item => item.path === payload.path)
        state.selectMenu.splice(index, 1)
    }
}

export default {
    state,
    mutations
}